<template>
  <el-form size="mini" :inline="true">
    <el-form-item v-if="school"><edu-search-school :value.sync="form.mhm_id" :args="{}" :form-datas="{}" /></el-form-item>
    <el-form-item><card-header title="" @change="changeOrderTime" /></el-form-item>
  </el-form>
</template>

<script>
import EduSearchSchool from '@/pages/school/choose';
import CardHeader from '@/pages/vcharts/card/card_header.vue';

export default {
  components: {
    EduSearchSchool,
    CardHeader
  },
  props: {
    school: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      form: {
        mhm_id: '',
        time: 'today'
      }
    };
  },
  watch: {
    'form.mhm_id': {
      handler(school) {
        this.$emit('update:school', school);
      }
    }
  },
  methods: {
    changeOrderTime: function(time) {
      this.$emit('update:time', time);
    }
  }
};
</script>

<style scoped>
.el-form-item {
  margin-bottom: 0;
}
</style>
